@import "../../styles/colors";
@cardShadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.16);

.home {
  height: 100%;
  background-color: #F8F7FA;
  background-image: url("../../assets/images/top-gr-bg.svg");
  background-repeat: no-repeat;
  background-size: 100%;
  background-position-y: 400rpx;

  // TODO: 打卡任务内容组件抽取
  .at-modal__container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 640px;
    height: 890px;
    background-color: #fff;
    border-radius: 16px;
    padding: 80px 72px 60px;
    box-sizing: border-box;

    .task-dialog-content {
      .title {
        display: block;
        font-size: 60px;
        text-align: center;
        margin-bottom: 20px;
      }

      .point {
        display: block;
        font-size: 26px;
        text-align: center;
      }

      .task-modal-image {
        margin-top: 24px;
        width: 430px;
        height: 430px;
        border-radius: 50%;
        display: block;
        z-index: 0;
      }
    }

    .complete-btn {
      height: 80px;
      line-height: 80px;
      border-radius: 30px;
      background-color: #6c63ff;
      color: #fff;
    }

    button:last-child {
      color: #fff;
    }
  }

  swiper {
    height: 200rpx;
  }
}

.header {
  background-color: #6c63ff;
  background-image: url("../../assets/images/wave-bg.svg");
  background-size: cover;
  border-radius: 0 0 26rpx 26rpx;
  padding: 100px 24rpx 0 24rpx;
}

.header__title-box {
  padding: 0 40px 30px 40px;

  &__text {
    display: block;
    font-size: 52px;
    color: white;
  }
}

.score-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: scroll;
  padding-bottom: 40px;
  align-items: center;
  margin-left: -24rpx;
  margin-right: -24rpx;

  &::-webkit-scrollbar {
    display: none;
  }
}

.current-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200rpx;
  min-height: 200rpx;
  margin-right: 20px;
  background-image: url("../../assets/images/diamond.svg");
  background-size: 100% 100%;
  background-position: left center;
  font-weight: bold;
  color: @purple60;
  white-space: nowrap;

  @icon-size: 70rpx;

  .icon-coins {
    height: @icon-size;
    width: @icon-size;
    background: url("../../assets/images/conis.svg");
    background-size: cover;
    font-weight: normal;
  }
}

.score-card {
  border-radius: 30px;
  background-color: white;
  display: flex;
  flex-direction: column;
  text-align: center;
  min-width: 180px;
  min-height: 180px;
  margin-right: 30px;
  box-shadow: 3rpx 6rpx 6rpx rgba(0, 0, 0, 0.3);
  background-size: 100% 100%;

  &__title {
    display: inline-block;
    font-size: 27rpx;
    padding: 20px;
    white-space: nowrap;
  }

  &__content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: @purple60;
    font-weight: bold;
  }

  .icon-coins {
    height: 40px;
    width: 40px;
    margin-right: 20px;
    background: url("../../assets/images/conis.svg");
    background-size: cover;
  }

  &--add-bg {
    background-image: url("../../assets/images/circle-plus.png");
    background-size: 120%;
    background-repeat: no-repeat;
    background-position-y: bottom;
  }

  &.all-list {
    .score-card__content {
      color: @purple100;
      justify-content: flex-end;
    }
  }
}

.questionnaire-entry {
  position: relative;
  margin: 1.2rem;
  padding: 1rem;
  box-shadow: @cardShadow;
  border-radius: 16rpx;
  background-image: url("../../assets/images/target-bg.png");
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: 120% 120%;
  background-position: center;

  .home-question-title {
    color: @purple100;
    margin-bottom: 24rpx;
    font-size: 28rpx;
  }

  .container {
    display: flex;

    .left {
      flex: 1;

      .home-question-items {
        display: flex;
        flex-wrap: wrap;
        justify-content: start;

        .home-question-item {
          font-weight: 600;
          padding-left: 16rpx;
          font-size: 24rpx;
          line-height: 48rpx;
          height: 48rpx;
          background-image: url('../../assets/images/polygon.svg');
          background-position: 0 0;
          background-size: 48rpx 48rpx;
          background-repeat: no-repeat;
          width: 33%;
          margin-bottom: 30rpx;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
    }

    .right {
      flex: 0;

      .rightIcon {
        display: flex;
        justify-content: start;
        flex-flow: column;
        height: 48rpx;
        width: 48rpx;
        border-radius: 50%;
        background-color: #6c63ff;
        color: #fff;
        line-height: 48rpx;

        .at-icon {
          margin: 0 auto;
          height: 48rpx;
          width: 48rpx;
        }
      }
    }
  }
}

.target-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;

  .target-card {
    width: 300rpx;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
    border-radius: 30rpx;
    padding: 20rpx 30rpx;
    background-image: url("../../assets/images/target-bg.png");
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    margin-bottom: 40rpx;
    box-shadow: @cardShadow;

    .title {
      display: block;
      font-size: 26rpx;
      margin-bottom: 24rpx;
    }

    .value {
      display: block;
      font-size: 60rpx;
      margin-bottom: 8rpx;
      text-align: center;
      color: #6c63ff;
      font-weight: 600;
    }

    .notes {
      display: block;
      text-align: center;
      font-size: 26rpx;
      color: #c4c4c4;

      &.waring {
        color: #ffb6b6;
      }
    }
  }
}

.recommend-training {
  padding: 40rpx 56rpx;

  .title {
    text-align: center;
    font-size: 34rpx;
    margin-bottom: 40rpx;
    display: flex;
    justify-content: center;
    line-height: 72rpx;
    .title-icon {
      display: inline-block;
      margin-right: 11rpx;
      height: 72rpx;
      width: 72rpx;
    }
  }

  .carousel {
    width: 640rpx;
    height: 200rpx;

    image {
      width: 100%;
      height: 100%;
      box-shadow: @cardShadow;
      border-radius: 40rpx;
    }
  }
}

.health-data {
  padding: 40rpx 56rpx 100rpx;

  .title {
    display: flex;
    justify-content: center;
    font-size: 34rpx;
    margin-bottom: 40rpx;
    text-align: center;
    line-height: 72rpx;

    .title-icon {
      display: inline-block;
      margin-right: 11rpx;
      height: 72rpx;
      width: 72rpx;
    }
  }

  .health-card {
    padding: 40rpx 30rpx;
    box-sizing: border-box;
    background-image: url("../../assets/images/health-data-bg.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    border-radius: 40rpx;
    border: 1px solid #e5e5e5;
    box-shadow: @cardShadow;

    &:not(:last-child) {
      margin-bottom: 40rpx;
    }

    .card-title {
      display: block;
      font-size: 26rpx;
      margin-bottom: 20rpx;
    }

    .card-value {
      font-size: 60rpx;
      margin-right: 12rpx;
      color: #6c63ff;
      font-weight: 600;
    }

    .value-unit {
      font-size: 26rpx;
      color: #c4c4c4;
    }
  }
}

.divider {
  width: 100%;
  height: 100px;
}
